<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3c.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">
<f:view>
	<h:head>
		<link type="text/css" rel="stylesheet" href="themes/bluesky/skin.css" />
		<link type="text/css" rel="stylesheet"
			href="resources/css/wienerhelden.css" />
	</h:head>
	<h:body>
		<ui:composition template="template.xhtml">
			<ui:define name="content">
				<h:form id="protocolCompletionForm">
				
					<h1>Protocol Completion:</h1>
					<h2>Customer</h2>
					<dl>
						<dt>Name:</dt>
						<dd><h:outputText
								value="#{endProtocolController.ticket.customer.firstName}" />&nbsp;<h:outputText
								value="#{endProtocolController.ticket.customer.lastName}" />
						</dd>
						<dt>Telephone No.:</dt>
						<dd><h:outputLink
								value="tel:#{endProtocolController.ticket.customer.telNo}">
							#{endProtocolController.ticket.customer.telNo}
							</h:outputLink>
						</dd>
						<dt>E-Mail:</dt>
						<dd><h:outputLink
								value="mailto:#{endProtocolController.ticket.customer.mailAddress}">
							#{endProtocolController.ticket.customer.mailAddress}
							</h:outputLink></dd>
						<dt>Address:</dt>
						<dd>
							<ul class="no-circles">
								<li><h:outputText
								value="#{endProtocolController.ticket.customer.address.street}" /></li>
						<li><h:outputText
								value="#{endProtocolController.ticket.customer.address.zip}" />&nbsp;<h:outputText
								value="#{endProtocolController.ticket.customer.address.city}" /></li>
						
						<li><h:outputText
								value="#{endProtocolController.ticket.customer.address.country}" /></li>
							</ul>
						</dd>
					</dl>
							
					
					<h2>Repair Case:</h2>
					<dl>
						<dt>Type Of Damage:</dt>
						<dd>
							<h:outputText value="#{endProtocolController.ticket.typeOfDamageDescription()}" />
						</dd>
						<dt>Fault:</dt>
						<dd>
							<h:outputText value="#{endProtocolController.ticket.faultDescription()}" />
						</dd>
						<dt>Description:</dt>
						<dd>
							<h:outputText value="#{endProtocolController.ticket.description}" />
						</dd>
						<dt>Surveyor Description:</dt>
						<dd>
							<h:outputText value="#{endProtocolController.ticket.surveyorDescription}" />
						</dd>
						<dt>Worker:</dt>
						<dd>
							<ul class="no-circles">
								<li><h:outputText
										value="#{endProtocolController.ticket.assignedWorker.firstName}" />&nbsp;
									<h:outputText
										value="#{endProtocolController.ticket.assignedWorker.lastName}" /></li>
								<li><h:outputLink
										value="mailto:#{endProtocolController.ticket.assignedWorker.telNo}">
								#{endProtocolController.ticket.assignedWorker.telNo}
								</h:outputLink></li>
	
							</ul>
						</dd>
						
						
						<dt>Costs:</dt>
						<dd>
							<dl class="no-bg">
								<dt>Estimated (€)</dt>
								<dd>
									<h:outputText
										value="#{endProtocolController.ticket.estimatedCosts}" />
								</dd>
								<dt>Actual (€)</dt>
								<dd>
									<h:inputText 
										value="#{endProtocolController.actualCosts}" required="true" requiredMessage="Enter the actual costs"
											label="Actual Costs"> </h:inputText>
								</dd>
							</dl>
						</dd>
						<dt>Duration:</dt>
						<dd>
							<dl class="no-bg">
								<dt>Estimated (h)</dt>
								<dd>
									<h:outputText
										value="#{endProtocolController.ticket.estimatedRepairDuration}" />
								</dd>
								<dt>Actual (h)</dt>
								<dd>
									<h:inputText
										value="#{endProtocolController.actualRepairDuration}" required="true" requiredMessage="Enter the Acutal Repair Duration"
											label="Actual Repair Duration"></h:inputText>
								</dd>
							</dl>
						</dd>
					</dl>

					<div class="formBlock">
						<fieldset>
							<legend>Preparation Data</legend>
							<div>
								<h:outputLabel for="notes" value="Notes"/>
								<h:inputTextarea cols="30" rows="10" id="notes"
									value="#{endProtocolController.notes}" />
							</div>
							<div>
								<p:commandButton id="finish" value="Submit Protocol"
									icon="ui-icon-check" action="#{endProtocolController.finish}" />
								<p:commandButton id="abort" value="Abort" icon="ui-icon-check"
									action="#{endProtocolController.abort}" />
							</div>
						</fieldset>
					</div>
				</h:form>
			</ui:define>
		</ui:composition>
	</h:body>
</f:view>
</html>
